package com.accp.entity;

public class DataResult {
	
	private int resultCode;
	
	private Object data;
	
	private String message;
	
	//获取成功的结果
	public static DataResult getSuccessResult(Object data ){
		DataResult result = new DataResult();
		result.setResultCode(200);
		result.setData(data);
		return result;
	}
	
	//获取失败的结果
	public static DataResult getErrorResult(int code,Object data,String msg){
		DataResult result = new DataResult();
		result.setResultCode(code);
		result.setData(data);
		result.setMessage(msg);
		return result;
	}

	public int getResultCode() {
		return resultCode;
	}

	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
